<template>
  <Dialog
    v-model="show"
    @confirm="handleSubmit"
    @close="close"
    title="详情"
    width="600px"
    :hide-footer="true"
  >
    <div class="mb12 flex">
      <div class="mr12 w-100 color-555555 flex-shrink-0 text-right">
        反馈人：
      </div>
      <div class="color-000000">{{ data.user_name }}</div>
    </div>
    <div class="mb12 flex">
      <div class="mr12 w-100 color-555555 flex-shrink-0 text-right">
        反馈人手机号：
      </div>
      <div class="color-000000">{{ data.user_phone }}</div>
    </div>
    <div class="mb12 flex">
      <div class="mr12 color-555555 w-100 flex-shrink-0 text-right">
        反馈信息：
      </div>
      <div class="color-000000">{{ data.content }}</div>
    </div>
    <div class="mb12 flex">
      <div class="mr12 w-100 color-555555 flex-shrink-0 text-right">
        反馈时间：
      </div>
      <div class="color-000000">{{ data.create_time }}</div>
    </div>
    <template #footer>
      <div class="dia-footer flex justify-end" v-if="!hideFooter">
        <el-button @click="close">关闭</el-button>
        <el-button v-if="type === '1'" type="primary" @click="close"
          >已处理</el-button
        >
      </div>
    </template>
  </Dialog>
</template>
<script setup>
import { ref, watch } from "vue";
import Dialog from "@/components/dialog.vue";
const show = defineModel();
const props = defineProps({
  data: {
    type: Object,
    default: () => ({}),
  },
  type: {
    type: String,
    default: "",
  },
});
watch(show, (val) => {
  if (val) {
  }
});
const handleSubmit = () => {
  formRef.value.validate((valid) => {
    if (valid) {
      console.log("submit!");
    } else {
      console.log("error submit!");
    }
  });
};
const close = () => {
  show.value = false;
};
</script>
<style lang="scss" scoped>
.w-100 {
  width: 100px;
}
.color-000000 {
  color: #000000;
}
.color-555555 {
  color: #555555;
}
</style>
